#include <stdio.h>

int main(){
    int arr[10] = {1, 2 , 3, 6, 12, 23, 11, 8, 99, 65};
    int max = arr[0];
    int min = arr[0];
    int arrlen = sizeof(arr) / sizeof(arr[0]);
    //最大值
    for(int i = 0; i < arrlen; i++){
        if(max < arr[i]){
            max = arr[i];
        }
    }
    //最小值
    for(int i = 0; i < arrlen; i++){
        if(min > arr[i]){
            min = arr[i];
        }
    }
    //总和
    int sum = 0;
    for(int i = 0; i < arrlen; i++){
        sum += arr[i];
    }
    //平均值
    double average;
    average = (double)sum / sizeof(arr);

    printf("最大值：%d\n", max);
    printf("最小值：%d\n", min);
    printf("总和：%d\n", sum);
    printf("平均值：%lf\n", average);

    return 0;

}
